/**
 *
 */
package com.angel.mocks.data.generator.daos.impl;

import java.io.Serializable;

import org.hibernate.criterion.Restrictions;

import com.angel.dao.generic.impl.GenericHibernateDAO;
import com.angel.mocks.data.generator.daos.AddressDAO;
import com.angel.mocks.data.generator.domainObject.Address;

/**
 * @author William
 *
 */
public class AddressHibernateDAO extends GenericHibernateDAO<Address, Serializable> implements AddressDAO {

	public Address findByCity(String city) {
		return super.findUniqueBy(Restrictions.eq("city", city));
	}

	public Address findByName(String name) {
		return super.findUniqueBy(Restrictions.eq("name", name));
	}

	public Address findByNumber(Integer number) {
		return super.findUniqueBy(Restrictions.eq("number", number));
	}




}
